<template>
	<view>
		<view>
			<navTop title="活动审核" :isHeight="false" hasBgc="white" :color="navtop.color" :isBack="true"></navTop>
		</view>
		<view class="examineCard">
			<examineCard
			:data="data"
			:actid="actid"
			:actdata="actdata"
			>
			</examineCard>
		</view>
	<!-- 	<view class="allPassBorder">
			<image class="allPassImg" src="https://img01-xusong.91q.com/FEF58342-0D41-412D-86F7-B906286E8D11.png"></image>
			<view class="allPassText" @click="agreeAll()">全部通过</view>
		</view> -->
	</view>
</template>

<script>
	import navTop from '../../components/navTop.vue'
	import examineCard from '../../components/examineCard.vue'
	export default {
		components: {
			navTop,
			examineCard
		},
		data(){
			return{
				navtop: {
					title: 'XXX',
					color: '#000000'
				},
				id:"",
				user_Id: this.$store.state.userInfo.id,
				data:[],
				imgUrl:'https://www.codingyt.com/getImage/',
				actid:"",
				actdata:{},
			}
		},
		methods:{
			getData(){
				let that=this;
				uni.request({
					url: 'https://www.codingyt.com/club/userEvent/select',
					data: {						
						eventId:this.id,						
					},
					success(res) {
						let tmpData=[]
						for (var i = 0; i < res.data.data.length; i++) {
							if(res.data.data[i].role==="pending"){
								tmpData.push(res.data.data[i])
							}
						}
						that.data = tmpData
					}
				})
			},
			agreeAll(){
				//这里可以获取到所有的id 进行批量修改他们的关系
				
			}
		},
		onLoad(item) {
			let data = JSON.parse(decodeURIComponent(item.data));
			this.id=data.id
			this.actdata=data;
			
			this.actid=data.id
			this.getData()
		}
	}
</script>

<style>
	.examineCard{
		position: absolute;
		top: 160rpx;
	}
	.allPassBorder{
		left: 424rpx;
		top: 1468rpx;
		width: 274rpx;
		height: 84rpx;
		border-radius: 62rpx;
		background-color: rgba(249, 193, 110, 100);
		color: rgba(255, 255, 255, 100);
		box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0, 0, 0, 0.4);
		position: fixed;
	}
	.allPassImg{
		left: 38rpx;
		top: 16rpx;
		width: 54rpx;
		height: 54rpx;
		position: absolute;
	}
	.allPassText{
		left: 100rpx;
		top: 20rpx;
		width: 142rpx;
		height: 48rpx;
		color: rgba(255, 255, 255, 100);
		font-size: 32rpx;
		text-align: left;
		  ;
		position: absolute;
	}
</style>
